package ch3.stack;

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.Stack;

/**
 * @author : zhayh
 * @date : 2022-9-27 14:39
 * @description :
 */

public class StackDemo {
    public static void main(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.push(4);
        stack.push(5);
        stack.push(6);
        stack.push(7);

        System.out.println("弹出元素：" + stack.pop());
        System.out.println("弹出元素：" + stack.pop());
        System.out.println("弹出元素：" + stack.pop());
        System.out.println("弹出元素：" + stack.pop());
        System.out.println("弹出元素：" + stack.pop());
        System.out.println("弹出元素：" + stack.pop());
    }
}
